QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

View Hints

Labels

ASCII
ViewHints
Binary
vwhn ( = 0x7677686E )

Data Format

No data.

Data Size

0

Description

The view hints object is used to group together all of the objects needed to render an image from a model (that is, a renderer, a camera, lights, and any additional information to be supplied to the renderer). These other objects occur as child objects to the view hints object; a container may be used to group them together. The container holding a view hints object and its associated rendering specifications should be placed immediately before the models to be rendered according to those specifications.

A metafile may contain more than one view hints object. If a metafile contains more than one view hints object, the specifications associated with each view hints object are inherited by all subsequent view hints objects, unless overridden by contrary specifications. Accordingly, a subsequent view hints object need have as child objects only those specifications that differ from those of its predecessors. For example, you may wish to render the same model using different cameras, while keeping the lights and other specifications intact. Once the initial specifications have been made, you need only specify a different camera together with a new view hints object. The model may be placed in the scope of a subsequent view hints object through the use of a reference object; the specification of the model need not be repeated.

Parent Hierarchy

Shared.

Parent Objects

None.

Child Objects

Renderer, camera, lights (as many as desired), attribute set, image dimensions, image mask, image clear color (all optional).

Example

3DMetafile ( 1 0 Normal toc> )
Container (
    ViewHints ( )
    Container (
        ViewAngleAspectCamera ( 0.73 1.0 )
        CameraPlacement (
            0 0 30
            0 0 0
            0 1 0
        )
    )
    DirectionalLight ( -0.7 -0.7 -0.65 )
    Container (
        AttributeSet ( )
        DiffuseColor ( 0.2 0.2 0.2 )
        SpecularControl ( 3 )
    )
    ImageDimensions ( 200 200 )
)
ref1:
BeginGroup ( DisplayGroup ( ) )
.
.
.
EndGroup ( )
Container (
    ViewHints ( )
    Container (
        ViewAngleAspectCamera ( 0.73 1.0 )
        CameraPlacement (
            0 10 0
            0 0 0
            0 1 0
        )
    )
)
Reference ( 1 )

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |